﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SchoolManagement.Models.RepositoryInterface;

namespace SchoolManagement.Models
{
    public class LoginRepository : ILoginRepository
    {
        SchoolModelContainer dbContext = new SchoolModelContainer();
        public  User ValidateUser(string userName, string password)
        {
            return dbContext.Users.FirstOrDefault(user => user.UserName == userName & user.UserPassword == password);            
        }

    }
}
